<?php
  include_once dirname(__FILE__)."/../classes/card.class.php";

  if(!isset($_GET['cardid']))
  {
    echo "./images/default.jpg";
    return;
  }

  $cardside = (isset($_GET['cardside']) && is_numeric($_GET['cardside'])) ? $_GET['cardside'] : 1;
    
  $card = new Card($_GET['cardid']);
  
  echo $card->getImageURL($cardside);
?>
